package com.liyasong.cf.book;

import java.io.IOException;

import org.apache.mahout.cf.taste.common.TasteException;
import org.apache.mahout.cf.taste.model.DataModel;

import com.liyasong.cf.MyDataModel;

public class DataInfo {

	public static void main(String[] args) throws TasteException, IOException {
		DataModel dataModel = MyDataModel.bookSmallData();
		long users = dataModel.getNumUsers();
		long books = dataModel.getNumItems();
		float minRating = dataModel.getMinPreference();
		float maxRating = dataModel.getMaxPreference();
		System.out.println("用户-图书-评分文件所含信息：");
		System.out.println("用户数："+users);
		System.out.println("图书数："+books);
		System.out.println("最低评分："+minRating+" 最高评分："+maxRating);
	}

}
